<template>
  <view class="my-search-container" @click="searchClickHandler" :style="{'background-color': bgcolor}">
    <view class="my-search-box" :style="{'border-radius': radius+'px'}">
      <uni-icons type="search"></uni-icons>
      <text class="search-text">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    props:{
      bgcolor: {
        type: String,
        default: '#c00000'
      },
      radius: {
        type: Number,
        default: 18
      }
    },
    methods: {
      searchClickHandler(){
        this.$emit('clickXxx')
      }
    }
  }
</script>

<style lang="scss">
  .my-search-container {
    // background-color: #c00000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    padding: 0 12px;
    .my-search-box {
      background-color: #ffffff;
      display: flex;
      justify-content: center;
      width: 100%;
      align-items: center;
      height: 36px;
      // border-radius: 18px;
      .search-text {
        margin-left: 8px;
      }
    }
  }
</style>
